<?php include PATH_VIEWS . 'common/header.php'; ?> 
<div class="main">
    <?php include PATH_VIEWS . 'common/left.php'; ?>
    <div class="main_right welcome_right" id="slide">
        <dl>
            <dt><h3>查询后台商品菜单信息 <span>[关闭/展开]</span></h3></dt>
            <dd class="border">
                <form name="form1" method="get" action="<?php echo URL; ?>">
                    <input type="hidden" name="C" value="<?php echo trim($_GET['C']); ?>" />
                    <input type="hidden" name="A" value="<?php echo trim($_GET['A']); ?>" />
                    <strong>请输入查询关键字：</strong>
                    <input type="hidden" name="way" value="<?php echo $this->way; ?>" />
                    <input id="searchVal" type="text" name="keywords" value="<?php echo isset($keywords) ? $keywords : ''; ?>" />
                    <input type="submit" class="submit" id="search" name="ok" value="搜索" />
                    <strong for="keywords">要求至少输入两个字符</strong>
                </form>            
            </dd>
        </dl>
        <dl>
            <dt>
            <h4>产品菜单列表</h4>
            </dt>
            <dd>
                <table class="system_envir chuli">                  
                    <tr>
                        <th>序号</th>
                        <th>上级菜单/商品标题</th>
                        <th>商品主图</th>
                        <th>商品附图</th>
                        <th>价格/折扣/实际价格</th>
                        <th>商品运费</th>
                        <th>商品数量</th>
                        <th>商品状态</th>
                        <th>排序</th>
                        <th>操作</th>
                    </tr>
                    <?php foreach ($info_list as $key => $ls) { ?>
                        <tr>
                            <td><?php echo ($key + 1); ?></td>
                            <td>
                                <h6> <?php
                                    $ids_arr = explode(',', $ls['FcateIds']);
                                    $html = '';
                                    foreach ($ids_arr as $num) {
                                        $html .= $category_arr[$num] . '>';
                                    }
                                    echo trim($html, '>');
                                    ?>
                                </h6>
                                <span style="display: block;line-height: 30px;"><?php echo $ls["Ftitle"]; ?></span>
                            </td>
                            <td align="center" style="padding: 0">
                                <img src="<?php echo (isset($ls['Fimg'])) ? HTTP_UPLOAD . $ls['Fimg'] : ''; ?>" alt="" width="80"/>
                            </td>
                            <td align="center" style="padding: 0">
                                <?php foreach (BaseYsp::jsonDeCode($ls['Fimgs']) as $ls2) { ?>
                                    <img src="<?php echo HTTP_UPLOAD . $ls2['imagePath'] ?>" height="40"/>
                                <?php } ?>
                            </td>
                            <td>
                                <ul>
                                    <li>市场价格：<?php echo $ls["Fprice"]; ?> 元</li>
                                    <li>商品折扣：<?php echo $ls["Fdiscount"]; ?> 元</li>
                                    <li>实际价格：<?php echo round(($ls["Fdiscount"] / $ls["Fprice"]*10),1); ?> 折</li>
                                </ul>
                            </td>
                            <td><?php echo ($ls["Fpostage"] == 0) ? '包邮' : $ls["Fpostage"]; ?></td>
                            <td><?php echo $ls["FproudctNum"] ?></td>
                            <td>
                                <a href="" <?php echo ($ls["Fstatus"] == 1) ? "style=color:red;" : ''; ?>>上架</a>
                                <a href="" <?php echo ($ls["Fstatus"] == 0) ? "style=color:red;" : ''; ?>>下架</a>
                            </td>
                            <td><?php echo $ls["Fsort"]; ?></td>
                            <td>
                                <a href="index.php?C=<?php echo trim($_GET['C']); ?>&A=<?php echo trim($_GET['A']); ?>&way=E&primarykey=<?php echo $ls['Fid']; ?>&page=<?php echo $page; ?>">修改</a>
                                <a href="index.php?C=<?php echo trim($_GET['C']); ?>&A=<?php echo trim($_GET['A']); ?>&way=D&primarykey=<?php echo $ls['Fid']; ?>&page=<?php echo $page; ?>" onclick="return getConfirm()">删除</a>
                            </td>
                        </tr>
                    <?php } ?>
                    <tr>
                    <link type="text/css" href="<?php echo HTTP_UI; ?>css/pager.css" rel="stylesheet"/>
                    <td colspan="14"><?php echo $pagerlink; ?></td>
                    </tr>
                </table>
            </dd>
        </dl>
    </div>
</div>
<?php include PATH_VIEWS . 'common/footer.php'; ?>